import java.util.Scanner;

public class PopulationProjection {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入年数：");
        int years = input.nextInt();

        long currentPop = 312_032_486L;
        long daysPerYear = 365;
        long births  = daysPerYear * 24 * 60 * 60 / 7;   // 每 7 秒 1 出生
        long deaths  = daysPerYear * 24 * 60 * 60 / 13;  // 每 13 秒 1 死亡
        long immigrants= daysPerYear * 24 * 60 * 60 / 45; // 每 45 秒 1 移民
        long netChange = (births + immigrants - deaths) * years;

        System.out.printf("%d 年后的人口约为 %d%n", years, currentPop + netChange);
        input.close();
    }
}